package i18n;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class Test {
    public static void main(String[] args){
        Date date=new Date();

        System.out.println("date = " + date);

        DateFormat dateFormat=DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL);

        System.out.println("dateFormat.format(date) = " + dateFormat.format(date));

        
        double d=213345345345345.34;

        NumberFormat numberFormat=NumberFormat.getNumberInstance();

        System.out.println("numberFormat.format(d) = " + numberFormat.format(d));

        numberFormat=NumberFormat.getCurrencyInstance();

        System.out.println("numberFormat.format(d) = " + numberFormat.format(d));


//        ResourceBundle rb=ResourceBundle.getBundle("i18n/resource");
        ResourceBundle rb=ResourceBundle.getBundle("i18n.resource");



        String a=rb.getString("a");

        System.out.println("a = " + a);



//        Locale locale=Locale.getDefault();
//
//        System.out.println(locale.getCountry()+" "+locale.getLanguage());
//
//        Locale[] locales=Locale.getAvailableLocales();
//
//        for (Locale l : locales) {
//            System.out.println(l.getCountry()+" "+l.getLanguage());
//
//        }


        
    }
}
